<!DOCTYPE html>
<html>
	<head>
		<script type="text/javascript" src="../js/wap_meta.js" ></script>
		<meta charset="utf-8" />
		<title></title>
		<script type="text/javascript" src="../js/jquery-2.1.1.js" ></script>
		<link rel="stylesheet" href="../css/base.css" />
		<script src="../js/jquery.cookie.js"></script>
		<script type="text/javascript" src="../js/link.js" ></script>
	</head>
	<style>
		* {
			padding: 0;
			margin: 0;
			font-family: "微软雅黑";
		}
		
		body {
			background: #f0f0f0;
		}
		.title p{
			width: 750px;
			text-align: center;
			font-size: 34px;
			color: #004591;
			padding-top: 26px;
		}
		.content{
			position: absolute;
			top: 600px;
			padding-bottom: 100px;
		}
		.btn{
			position: relative;
			height: 86px;
			width: 750px;
		}
		.btn p{
			padding-top: 14px;
			padding-left: 28px;
			font-size: 32px;
			color: #333333;
		}
		.btn img{
			position: absolute;
			left: 700px;
			top: 16px;
		}
		.line{
			position: absolute;
			left: 28px;
			width: 722px;
			top: 78px;
			height: 1px;
			background: #d0d0d0;
		}
		.comform{
			position: absolute;
			left: 20px;
			bottom: 180px;
		}
		.content1{
			position: absolute;
			top: 100px;
		}
		.content1 p{
			font-size: 28px;
			color: #333333;
			padding-left: 40px;
			height: 54px;
		}
		.att{
			font-size: 40px;
			color: #ea5404;
			width: 750px;
			text-align: center;
		}
		.content2{
			position: absolute;
			
		}
		.content2 img{
			position: absolute;
			left: 275px;
			top: 116px;
		}
		.content2 p{
			position: absolute;
			text-align: center;
			width: 750px;
			color: #ea5404;
			font-size: 40px;
			top: 340px;
		}
	</style>
	<body>
		<div class="title">
			<p>查询结果</p>
		</div>
		<div class="content1" id="con1"></div>
		<div class="content2" id="con2">
			<img src="../img/search/result.png" />
			<p>订单信息不存在！</p>
		</div>
		<img class="comform" src="../img/search/researchBtn.png" />
		<script>
			$("#con1").hide();
			$("#con2").hide();
			
			$.get(linkObj.search + "?orderNum="+$.cookie("orderNumber")+"&realName="+$.cookie("orderName"),function(data){
				if(data.code == 0){
					if(data.data.order != ""){
						$("#con1").empty();
						
						var str = "";
						str += "<p>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名："+data.data.order.name+"</p>"
						str += "<p>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别："+data.data.order.sex+"</p>"
						str += "<p>出生日期："+data.data.order.birthday+"</p>"
						str += "<p>预约时间："+data.data.order.appointmenDate+"</p>"
						str += "<p>领取地址："+data.data.order.signAddress+"</p>"
						str += "<div class='att'>"+setStatus(data.data.order.orderStatus)+"</div>";
						$("#con1").append(str);
						
						$("#con1").show();
						return;
					}
				}
				$("#con2").show();
			},'json')
			
			function setBir(bir){
				return bir.substring(0,4) + "-" + bir.substring(4,6) + "-" + bir.substring(6,8);
			}
			
			function setStatus(status){
				switch (status){
					case -10:
						return "已作废";
					case 10:
						return "待制证";
					case 11:
						return "已制证待复核";
					case 20:
						return "待发证";
					case 30:
						return "已发证";
					case 40:
						return "已激活";
					case 50:
						return "待注销";
					case 60:
						return "已注销";
					case 70:
						return "已关闭";
				}
				return "";
			}
			
			$(".comform").click(function(){
				document.location = "search.html";
			})
		</script>
	</body>
</html>
